<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue_v-if</title>
</head>
<body>
    <div id="app">
      <!-- <p v-if="true">我是p标签</p>--> 
      <input type="button" value="切换显示状态" @click="toggleIsShow" alt="">
        <p v-if="isShow">啊哈</p>
        <p v-show="isShow">RUA!</p>
        <h2 v-if="temperature >= 35">热死!!!</h2>
    </div>
    <!-- 开发环境版本，包含了有帮助的命令行警告 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
    <script>
        var app = new Vue({
            el:"#app", 
            data:{
                isShow:false,
                temperature:40
            },
            methods:{
                toggleIsShow:function(){
                    this.isShow = !this.isShow;
                }
            }
        })
    </script>
</body>
</html>
